package com.nf1000.balancelibrary.newbalance;

import android.bluetooth.BluetoothManager;
import android.content.Context;
import android.content.pm.PackageManager;

/**
 * 蓝牙工具
 */
public class BleUtil {

    private BleUtil() {
    }

    /** 检查设备是否支持蓝牙4.0 */
    public static boolean isBLESupported(Context context) {
        return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE);
    }

    /** 获取BluetoothManager */
    public static BluetoothManager getManager(Context context) {
        return (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE);
    }
    
}
